﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Hosting;

namespace ArchivingDataWebForms.Helpers
{
    public class CustomAppSettings
    {
        public static string DefaultFolderImagePath
        {
            get
            {
                string s=System.Configuration.ConfigurationManager.AppSettings["DefaultFolderImagePath"];
                return s;
            }
        }

        public  static string FoldersImagesPath
        {
            get
            {
                string s= System.Configuration.ConfigurationManager.AppSettings["FoldersImagesPath"];
                return s;
            }
        }


        public static string DefaultFileImagePath
        {
            get
            {
                string s= System.Configuration.ConfigurationManager.AppSettings["DefaultFileImagePath"];
                return s;
            }
        }

        public static string FilesPathes
        {
            get
            {
                string s= System.Configuration.ConfigurationManager.AppSettings["FilesPathes"];
                return s;
            }
        }
        public static string AttachmentsVersioning
        {
            get
            {
                string s = System.Configuration.ConfigurationManager.AppSettings["VersioningPath"];
                return s;
            }
        }
        public static string OCREXE
        {
            get
            {
                string s = System.Configuration.ConfigurationManager.AppSettings["OCREXEPath"];
                return s;
            }
        }
        public static string getActualPath(string s)
        {
            if (s.StartsWith("~") || s.StartsWith("../") || s.StartsWith("/"))
            {
                return HostingEnvironment.MapPath(s);
            }
            return s.Replace("/","\\");
        }
    }
}